package org.msfj.authority.client.configuration;

import org.msfj.authority.client.config.ClientAuthConfig;
import org.msfj.authority.client.interceptor.ClientFeignRequestInterceptor;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@ConditionalOnProperty(prefix = "feign-client", name = "name")
public class ClientAutoConfiguration {

    @Bean
    ClientAuthConfig getClientAuthConfig() {
        return new ClientAuthConfig();
    }

    @Bean
    ClientFeignRequestInterceptor getClientFeignRequestInterceptor(){
        return new ClientFeignRequestInterceptor();
    }
}
